package com.tdkj.model.bbs;

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * EjfUser entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "ejf_user", catalog = "west", uniqueConstraints = @UniqueConstraint(columnNames = "email"))
public class EjfUser implements java.io.Serializable {

	// Fields

	private String userId;
	private String nickname;
	private String pwd;
	private String email;
	private String icq;
	private String webpage;
	private String avatar;
	private String gender;
	private String birth;
	private String city;
	private String remoteIp;
	private String brief;
	private String isMailPub;
	private Integer posts;
	private Integer unreadSms;
	private Integer credits;
	private String groupId;
	private Timestamp lastVisited;
	private Integer visitCount;
	private Short loginCount;
	private Timestamp loginExpire;
	private Timestamp setpwdExpire;
	private String state;
	private Timestamp createTime;
	private Timestamp updateTime;
	private Set<EjfShortMsg> ejfShortMsgs = new HashSet<EjfShortMsg>(0);
	private Set<EjfFriend> ejfFriends = new HashSet<EjfFriend>(0);
	private Set<EjfBookmark> ejfBookmarks = new HashSet<EjfBookmark>(0);

	// Constructors

	/** default constructor */
	public EjfUser() {
	}

	/** minimal constructor */
	public EjfUser(String userId, String pwd, String email, Timestamp updateTime) {
		this.userId = userId;
		this.pwd = pwd;
		this.email = email;
		this.updateTime = updateTime;
	}

	/** full constructor */
	public EjfUser(String userId, String nickname, String pwd, String email, String icq, String webpage, String avatar, String gender, String birth, String city, String remoteIp, String brief, String isMailPub, Integer posts, Integer unreadSms, Integer credits, String groupId,
			Timestamp lastVisited, Integer visitCount, Short loginCount, Timestamp loginExpire, Timestamp setpwdExpire, String state, Timestamp createTime, Timestamp updateTime, Set<EjfShortMsg> ejfShortMsgs, Set<EjfFriend> ejfFriends, Set<EjfBookmark> ejfBookmarks) {
		this.userId = userId;
		this.nickname = nickname;
		this.pwd = pwd;
		this.email = email;
		this.icq = icq;
		this.webpage = webpage;
		this.avatar = avatar;
		this.gender = gender;
		this.birth = birth;
		this.city = city;
		this.remoteIp = remoteIp;
		this.brief = brief;
		this.isMailPub = isMailPub;
		this.posts = posts;
		this.unreadSms = unreadSms;
		this.credits = credits;
		this.groupId = groupId;
		this.lastVisited = lastVisited;
		this.visitCount = visitCount;
		this.loginCount = loginCount;
		this.loginExpire = loginExpire;
		this.setpwdExpire = setpwdExpire;
		this.state = state;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.ejfShortMsgs = ejfShortMsgs;
		this.ejfFriends = ejfFriends;
		this.ejfBookmarks = ejfBookmarks;
	}

	// Property accessors
	@Id
	@Column(name = "userID", unique = true, nullable = false, length = 15)
	public String getUserId() {
		return this.userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	@Column(name = "nickname", length = 15)
	public String getNickname() {
		return this.nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	@Column(name = "pwd", nullable = false, length = 32)
	public String getPwd() {
		return this.pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	@Column(name = "email", unique = true, nullable = false, length = 40)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "icq", length = 40)
	public String getIcq() {
		return this.icq;
	}

	public void setIcq(String icq) {
		this.icq = icq;
	}

	@Column(name = "webpage", length = 60)
	public String getWebpage() {
		return this.webpage;
	}

	public void setWebpage(String webpage) {
		this.webpage = webpage;
	}

	@Column(name = "avatar", length = 50)
	public String getAvatar() {
		return this.avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	@Column(name = "gender", length = 1)
	public String getGender() {
		return this.gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	@Column(name = "birth", length = 10)
	public String getBirth() {
		return this.birth;
	}

	public void setBirth(String birth) {
		this.birth = birth;
	}

	@Column(name = "city", length = 20)
	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	@Column(name = "remoteIP", length = 25)
	public String getRemoteIp() {
		return this.remoteIp;
	}

	public void setRemoteIp(String remoteIp) {
		this.remoteIp = remoteIp;
	}

	@Column(name = "brief", length = 200)
	public String getBrief() {
		return this.brief;
	}

	public void setBrief(String brief) {
		this.brief = brief;
	}

	@Column(name = "isMailPub", length = 1)
	public String getIsMailPub() {
		return this.isMailPub;
	}

	public void setIsMailPub(String isMailPub) {
		this.isMailPub = isMailPub;
	}

	@Column(name = "posts")
	public Integer getPosts() {
		return this.posts;
	}

	public void setPosts(Integer posts) {
		this.posts = posts;
	}

	@Column(name = "unreadSMs")
	public Integer getUnreadSms() {
		return this.unreadSms;
	}

	public void setUnreadSms(Integer unreadSms) {
		this.unreadSms = unreadSms;
	}

	@Column(name = "credits")
	public Integer getCredits() {
		return this.credits;
	}

	public void setCredits(Integer credits) {
		this.credits = credits;
	}

	@Column(name = "groupID", length = 1)
	public String getGroupId() {
		return this.groupId;
	}

	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}

	@Column(name = "lastVisited", length = 19)
	public Timestamp getLastVisited() {
		return this.lastVisited;
	}

	public void setLastVisited(Timestamp lastVisited) {
		this.lastVisited = lastVisited;
	}

	@Column(name = "visitCount")
	public Integer getVisitCount() {
		return this.visitCount;
	}

	public void setVisitCount(Integer visitCount) {
		this.visitCount = visitCount;
	}

	@Column(name = "loginCount")
	public Short getLoginCount() {
		return this.loginCount;
	}

	public void setLoginCount(Short loginCount) {
		this.loginCount = loginCount;
	}

	@Column(name = "loginExpire", length = 19)
	public Timestamp getLoginExpire() {
		return this.loginExpire;
	}

	public void setLoginExpire(Timestamp loginExpire) {
		this.loginExpire = loginExpire;
	}

	@Column(name = "setpwdExpire", length = 19)
	public Timestamp getSetpwdExpire() {
		return this.setpwdExpire;
	}

	public void setSetpwdExpire(Timestamp setpwdExpire) {
		this.setpwdExpire = setpwdExpire;
	}

	@Column(name = "state", length = 1)
	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}

	@Column(name = "createTime", length = 19)
	public Timestamp getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

	@Column(name = "updateTime", nullable = false, length = 19)
	public Timestamp getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Timestamp updateTime) {
		this.updateTime = updateTime;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "ejfUser")
	public Set<EjfShortMsg> getEjfShortMsgs() {
		return this.ejfShortMsgs;
	}

	public void setEjfShortMsgs(Set<EjfShortMsg> ejfShortMsgs) {
		this.ejfShortMsgs = ejfShortMsgs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "ejfUser")
	public Set<EjfFriend> getEjfFriends() {
		return this.ejfFriends;
	}

	public void setEjfFriends(Set<EjfFriend> ejfFriends) {
		this.ejfFriends = ejfFriends;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "ejfUser")
	public Set<EjfBookmark> getEjfBookmarks() {
		return this.ejfBookmarks;
	}

	public void setEjfBookmarks(Set<EjfBookmark> ejfBookmarks) {
		this.ejfBookmarks = ejfBookmarks;
	}

}